<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>客户信息管理</title>
<meta name="decorator" content="default" />
<script src="/jeesite/en/js/inStorageDetailList.js" type="text/javascript"></script>
</head>
<body class="fixed-top">
	
<div class="container" style="width: 100%;">
	<div style="margin: 20px; border: 1px solid #c8d1d5;">
		<div style="padding: 13px; background-color: #f4f4f4; border-bottom: 1px solid #c8d1d5;">
			<h4>
				<i class="icon-globe"></i>入库管理
			</h4>
			<ul class="ul-form" style="float: right; margin-top: -25px;">
				<li style="list-style: none"><a class="btn btn-primary"
					href="${ctx}/en/inStorageDetail/form"> <i class="icon-pencil"></i>&nbsp;新增
				</a> <a class="btn btn-danger" href="javascript:void(0)"
					onclick="deleteData()"> <i class="icon-trash"></i>&nbsp;删除</a>&nbsp;
				<a class="btn btn-info" href="javascript:void(0)" id="btnExport">
						<i class="icon-download"></i>&nbsp;导出</a></li>
			</ul>
		</div>
		<div style="margin: 17px;">
			<form:form id="searchForm" modelAttribute="inStorage" 
				action="${ctx}/en/inStorageDetail/list" method="post" class="breadcrumb form-search">
				<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
				<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}" />
				<div class="btn-group" id="btnStatusGroup" style="margin-bottom: 10px;">
                    <button class="btn disabled " value="0">所有</button>
                    <button class="btn" value="1">待审核</button>
                    <button class="btn" value="2">审核通过</button>
                    <button class="btn" value="3">审核失败</button>
               	</div>
				<ul class="ul-form">
					<li><form:input path="codeNum" htmlEscape="false" maxlength="64" placeholder="请输入入库单号" class="span3"/></li>
					<li><label>日期：</label>&nbsp;
						<form:input path="startDate" readonly="true" class="input-small Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});" />&nbsp; - &nbsp;
						<form:input path="endDate" readonly="true" class="input-small Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});" />
					</li>
					<li class="btns">
						<a class="btn btn-primary" href="javascript:void(0)" onclick="return page();">
						<i class="icon-search"></i>&nbsp;搜索</a>
						<a class="btn btn-primary" href="javascript:void(0)" id="seniorSearch">
							高级搜索&nbsp;<i class="icon-caret-down"></i></a>
					</li>
				</ul>
				<div class="row-fluid" id="seniorSearchDiv"  style="margin-top: 20px;display: none;">
					<div class="span2">
						<label class="control-label" style="font-size: 14px;">供应商名称</label>
						<div>
							<form:input path="supplier.name" htmlEscape="false" maxlength="64" class="span11"/>
						</div>
					</div>
					<div class="span2">
						<label class="control-label" style="font-size: 14px;">单据类型</label>
						<div>
							<%-- <form:select path="inStorageType" class="span11">
								<form:option value="" label="请选择单据类型" />
								<form:options items="${fns:getInStorageTypeList()}" itemLabel="name"
									itemValue="id" htmlEscape="false" />
							</form:select> --%>
							${sessionScope.inStorageType }
							<form:select path="inStorageType.name" class="span11">
								<form:option value="" label="请选择单据类型" />
								<form:options items="${fns:getInStorageTypeList()}" itemLabel="name"
									itemValue="id" htmlEscape="false" />
							</form:select>
						</div>
					</div>
					<div class="span2">
						<label class="control-label" style="font-size: 14px;">关联单号</label>
						<div>
							<form:input path="orderNumber" htmlEscape="false" maxlength="64" class="span11"/>
						</div>
					</div>
					<div class="span2" style="margin-left: -10px;">
						<label class="control-label" style="font-size: 14px;"></label>
						<div>
							<button type="button" class="btn btn-primary" onclick="save()">
							<i class="icon-search"></i>&nbsp;搜索</button>
						</div>
					</div>
				</div>
			</form:form>
			<sys:message content="${message}" />
			<table id="contentTable" class="table table-hover table-bordered"
				style="word-wrap: break-all; word-break: break-all;">
				<thead>
					<tr>
						<th style="width: 8px;"><input type="checkbox"
							class="group-checkable" id="checkAll" /></th>
						<th>入库单号</th>
						<th>入库类型</th>
						<th>供应商名称</th>
						<th>关联单号</th>
						<th>货品总量</th>
						<th>总金额</th>
						<!-- <th>状态</th> -->
						<th>制单人</th>
						<th>创建时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${page.list}" var="info">
						<tr>
							<td style="width: 8px;"><input type="checkbox" name="id"
								class="group-checkable" value="${info.id}" /></td>
							<td>${info.codeNum}</td>
							<td>${info.inStorageType.name}</td>
							<td>${info.supplier.name}</td>
							<td>${info.orderNumber}</td>
							<td>${info.totalCount}</td>
							<td>${info.totalPrice}</td>
							<!-- <td>状态</td> -->
							<td>${info.docMaker}</td>
							<td><fmt:formatDate value="${info.docTime}" pattern="yyyy-MM-dd" /></td>
							<td>
								<shiro:hasPermission name="en:inStorageDetail:edit">
									<a href="${ctx}/en/inStorageDetail/form?id=${info.id}"><i
											class="icon-edit"></i></a> <a
										href="${ctx}/en/inStorageDetail/delete?id=${info.id}"
										onclick="return confirmx('确认要删除该信息吗？', this.href)"><i
											class="icon-remove"></i></a>
								</shiro:hasPermission>
								<a href="javascript:" onclick="see(this)">
								<i class="icon-eye-open"></i></a> 
								<input type="hidden" value="${info.id}">
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div class="pagination">${page}</div>
		</div>
	</div>
</div>	

<!-- 查看入库信息JBox - HTML  -->
<div id="divSeeInStorage" class="hide" style="overflow: auto;">
<div style="padding: 10px;">
	<div class="row-fluid" style="border: 1px solid #c8d1d5;margin-bottom: 10px;background-color: #F4F4F4;">
		<div class="row-fluid ">
			<div class="span4">
				<label class="control-label">入库单编号</label>
					<div>
						<input type="text" class="span12" readonly="readonly" id="codeNums"/>
					</div>
			</div>
			<div class="span4">
				<label class="control-label">入库单类型</label>
					<div>
						<input type="text" class="span12" readonly="readonly" id="inStorageTypeName"/>
					</div>
			</div>
			<div class="span4">
				<label class="control-label">供应商名称</label>
					<div>
						<input type="text" class="span12" readonly="readonly" id="supplierName"/>
					</div>
			</div>
		</div>
		<div class="row-fluid ">
			<div class="span4">
				<label class="control-label">制单人</label>
					<div>
						<input type="text" class="span12" readonly="readonly" id="docMaker"/>
					</div>
			</div>
			<div class="span4">
				<label class="control-label">关联单号</label>
					<div>
						<input type="text" class="span12" readonly="readonly" id="orderNumbers"/>
					</div>
			</div>
		</div>
	</div>
	<table id="contentTable" class="table table-hover table-bordered">
		<thead>
			<tr class="widget-title">
				<th>产品名称</th>
				<th>产品代码</th>
				<th>规格</th>
				<th>品牌</th>
				<th>封装</th>
				<th>批次</th>
				<th>单价</th>
				<th>入库数</th>
				<th>总价</th>
				<th>库位</th>
			</tr>
		</thead>
		<tbody id="productInfoTbody">
		</tbody>
	</table>
	<div class="pagination">
		<ul>
			<li id="clientelePreviousPageLi" class="disabled"><a id="clientelePreviousPage" href="javascript:">&#171;上一页</a></li>
			<li id="clienteleNextPageLi"><a id="clienteleNextPage" href="javascript:">下一页&#187;</a></li>
			<li class="disabled controls">
				<a>当前&nbsp;
					<span id="clientelePageNo"></span> /  
					<span id="clientelePageSize"></span> 条，共
					<span id="clienteleCount"></span> 条
				</a>
			</li>
		</ul>
	</div>
</div>	
</div>


</body>
</html>